package com.orchid.community.models.mapper;

import com.orchid.community.models.DTO.UserParam;
import com.orchid.community.models.DTO.UserRequestDTO;
import com.orchid.community.models.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface UserMapper {

    List<UserRequestDTO> getUserList(UserParam param);

    List<Integer> getByTags(@Param("tags") List<String> tags);

    int deleteByUserNo(String userId);

    int getByUserNo(String userId);

    int insertUserTags(@Param("id") String id, @Param("tagIds") List<Integer> tagIds, @Param("now") LocalDateTime now);

    User selectByPrimaryKey(Integer userId);

    int update(User user);
}
